< previous page page_256 next page >

Page 256
Although I only discuss how to use a resource file class to load text values into labels, it is interesting to briefly note how internationalization is supported. In the Professional and Enterprise editions of Visual Basic, internationalization is fundamentally supported in the LocaleID (LCID) of the standard executable and ActiveX controls you create.
When you create an ActiveX control, that control is associated with a UserControl object. This object has an object reference to an AmbientProperties object. A set of ambient properties helps to interface your control to the application in which it is used. This AmbientProperties object, in turn, has a LocaleID property that you check to find out the country in which the application is being operated. Knowing this information helps you internationalize your software. For more information on LocaleID, refer to the Localizing Controls article in Visual Basic Books Online.

You can create a resource file with any word processor and the resource compiler found under the \Tools subdirectory in your Visual Basic root directory or the Visual Basic CD-ROM. For your purposes, use the form in your Memento example. Listing 11.7 shows the specifications for the form you can use to create the form. Figure 11.3 shows what the actual form looks like.
LISTING 11.7. THE SPECIFICATIONS FOR THE FORMfrmAccountMaintForm.

9f8044bafea36a1f728739c0bb58ef4c.gif
 1: VERSION 5.00
 2: Begin VB.Form frmTest
 3:    Caption         =   Modify Name
 4:    ClientHeight    =   3195
 5:    ClientLeft      =   60
 6:    ClientTop       =   345
 7:    ClientWidth     =   4680
 8:    LinkTopic       =   Form1
 9:    ScaleHeight     =   3195
10:    ScaleWidth      =   4680
11:    StartUpPosition =   3  'Windows Default
12:    Begin VB.CommandButton cmdUndo
13:       Caption         =   Undo
14:       Height          =   375
15:       Left            =   2760
16:       TabIndex        =   3
17:       Top             =   2280
18:       Width           =   1455
19:    End
20:    Begin VB.TextBox Text2
21:       Height          =   285
22:       Left            =   1440
23:       TabIndex        =   2
24:       Text            =   Text2
continues

 
< previous page page_256 next page >

If you like this book, buy it!